package com.xgp.labblogaffter.mapper;

import com.xgp.labblogaffter.model.Writes;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface WritesMapperExt {

    @Update("update writes set supcount = supcount + 1 where wid = #{id}")
    void addSupCountById(Integer id);

    @Select("select * from writes")
    List<Writes> findAll();

    @Select("SELECT COUNT(*) FROM writes")
    long WritesCount();
}
